const initValue = { token: '', refresh_token: '' }

function login(state = initValue, action) {
  switch (action.type) {
    case 'login/token':
      return { ...action.payload }
    case 'login/removeToken':
      return { token: '', refresh_token: '' }
    default:
      return state
  }
}

export default login
